<template>
  <div class="hots">
    <h3>热门搜索</h3>
    <div class="hots_items">
      <div class="hot_item" v-for="hot in hots" :key="hot.id">
        <p>{{ hot.storeName }}</p>
      </div>
    </div>
  </div>
</template>
<script>
export default {
  name: "Vue2FxhHotSearch",
  data() {
    return {
      hots: [],
    };
  },
  created() {
    this.$axios
      .get("https://apif.java.crmeb.net/api/front/product/hot?page=1&limit=10")
      .then(({ data }) => {
        this.hots = data.data.list;
      });
  },
};
</script>

<style lang="scss" scoped>
.hots {
  h3 {
    height: 40px;
    text-align: center;
    line-height: 40px;
    // margin-bottom: 15px;
  }
  p {
    height: 50px;
    line-height: 50px;
    padding-left: 20px;
    color: blue;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
  }
}
</style>
